package com.clientmanage.mapper;

import com.clientmanage.domain.bean.ServiceEvaluation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.clientmanage.domain.vo.serviceEvaluationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author HUANG
 * @since 2025-06-30
 */
@Mapper
public interface ServiceEvaluationMapper extends BaseMapper<ServiceEvaluation> {
    /**
     * 分页+条件查询服务评价VO（复杂多表联查）
     */
    List<serviceEvaluationVo> selectPageVo(@Param("serviceName") String serviceName,
                                           @Param("score") Integer score,
                                           @Param("date") String date,
                                           @Param("pageSize") Integer pageSize,
                                           @Param("offset") Integer offset);

    /**
     * 统计服务评价分数和数量
     */
    Map<String, Object> getEvaluationStats(@Param("serviceName") String serviceName, @Param("date") String date);
}
